#ifndef KC_DATABASE_TABLE_H_KC_
#define KC_DATABASE_TABLE_H_KC_

#include <string>
#include <vector>

namespace kc_sf
{
	typedef std::vector <std::string> DatabaseRecord;
	typedef std::vector <std::string> DatabaseColumn;
	typedef std::vector <DatabaseRecord > DatabaseRecords;

	class DatabaseTable
	{
		public:

			explicit DatabaseTable( const DatabaseRecord &column_names );

			void insert( const DatabaseRecord &record );

			DatabaseColumn selectColumn( const std::string &column_name ) const;
			const DatabaseRecords & selectAll() const;
			DatabaseRecords select( const std::vector <std::string> &column_names ) const;
			const DatabaseRecord & getColumnNames() const;

			DatabaseRecord & getRecord( size_t record_index );
			const DatabaseRecord & getRecord( size_t record_index ) const;
			size_t recordsNr () const;

		private:

			DatabaseRecord t_column_names;
			DatabaseRecords t_values;
	};
}

#endif // KC_DATABASE_TABLE_H_KC_


